package com.tencent.sr.iris.basic.mp.common.exception;

import com.tencent.sr.rmall.common.exception.code.ErrorCode;

/**
 * 公共的异常枚举
 */
public enum SystemCommErrorCode implements ErrorCode {
    PARAM_ERROR("参数异常"),
    ES_QUERY_ERROR("es查询系统异常"),
    TYPE_TRANS_ERROR("类型转换错误"),
    RPC_ERROR("远程调用失败"),
    EXCEL_DATA_ERROR("EXCEL_DATA_ERROR", "请检查Excel数据，第【%s】行，第【%s】列"),
    KAFKA_SEND_MSG_ERROR("Kafka消息发送失败"),
    USER_NOT_EXIST("用户不存在"),
    USER_IS_DELETED("用户已注销"),
    REDIS_EXECUTE_ERROR("redis操作失败"),
    ;
    private final String description;

    SystemCommErrorCode(String description) {
        this.description = description;
    }

    SystemCommErrorCode(String code, String description) {
        this.description = description;
    }

    @Override
    public String getCode() {
        return this.name();
    }

    @Override
    public String getDescription() {
        return this.description;
    }
}
